package cn.gok.day1;

import java.io.UnsupportedEncodingException;

/**
 * @ClassName Bian
 * @Description TODO
 * @Author HP
 * @Date 10:56 2022/7/4
 * @Version 1.0
 **/
public class Bian {
    public static void main(String[] args) {

        字符();
    }

    private static void 字符() {

        for (int i=0;i<26;i++){
            System.out.println((char) ('a'+i)+"---"+(char) ('A'+i));
        }
    }

    private static void 字符串和其它类型的转换(){
        int a=123;
        String str=new Integer(a).toString();
        int a2=Integer.parseInt(str);
        int a3=new Integer(str);
    }
    private static void 拆装箱(){
        int i=1;
        //装
        Integer i2=2;
        Integer i3=new Integer(i);
        Integer i4=Integer.valueOf(i);
        //拆
        int i5=i2.intValue();
    };
    private static void 字符类() throws UnsupportedEncodingException {
        char c='a';
        char c2='\0';//空字符
        char c3=' ';//空格字符
        char c4='中';
        System.out.println(new String("a").getBytes().length);
        System.out.println(new String("中").getBytes("utf-8").length);
        //一个中文："gbk"1个，“utf”3个，“unicode”4个
    }
    private static void 数值类(){
        int i=Integer.MIN_VALUE;
        System.out.println(i);
        long i2=1234567891321L;
        System.out.println(i2);
        float f=10.0f;
        float f2=(float) 10.0d;
    }
}
